
#line 1 "ragel-guide-example-2.1.rl"
#include <string.h>
#include <stdio.h>

// regualar comments


#line 17 "ragel-guide-example-2.1.rl"



{
	cs = (int)foo_start;
}

#line 20 "ragel-guide-example-2.1.rl"



static const int foo_start = 1;
static const int foo_first_final = 11;
static const int foo_error = 0;

static const int foo_en_main = 1;

static const char _foo_nfa_targs[] = {
	0, 0
};

static const char _foo_nfa_offsets[] = {
	0, 0, 0, 0, 0, 0, 0, 0,
	0, 0, 0, 0, 0
};

static const char _foo_nfa_push_actions[] = {
	0, 0
};

static const char _foo_nfa_pop_trans[] = {
	0, 0
};


#line 22 "ragel-guide-example-2.1.rl"


int main(int ac, char* av[]) {
	// cs, p, pe must be declared
	int cs, res2 = 0;
	if (ac > 1) {
		char *p = av[1];
		char *pe = p + strlen(p) + 1;
		
		
		{
			if ( p == pe )
			goto _test_eof;
			switch ( cs )
			{
				case 1:
				goto st_case_1;
				case 0:
				goto st_case_0;
				case 11:
				goto st_case_11;
				case 2:
				goto st_case_2;
				case 3:
				goto st_case_3;
				case 4:
				goto st_case_4;
				case 5:
				goto st_case_5;
				case 6:
				goto st_case_6;
				case 7:
				goto st_case_7;
				case 8:
				goto st_case_8;
				case 9:
				goto st_case_9;
				case 10:
				goto st_case_10;
			}
			goto st_out;
			st_case_1:
			switch( ( (*( p))) ) {
				case 0: {
					goto ctr0;
				}
				case 66: {
					goto st3;
				}
				case 71: {
					goto st5;
				}
				case 98: {
					goto st3;
				}
				case 102: {
					goto st7;
				}
				case 103: {
					goto st9;
				}
			}
			if ( 48 <= ( (*( p))) && ( (*( p))) <= 57 ) {
				goto st2;
			}
			{
				goto st0;
			}
			st_case_0:
			st0:
			cs = 0;
			goto _out;
			ctr0:
			{
				#line 12 "ragel-guide-example-2.1.rl"
				
				// c comments
				/* setting */
				res2 = 2;
			}
			
			goto st11;
			st11:
			p+= 1;
			if ( p == pe )
			goto _test_eof11;
			st_case_11:
			{
				goto st0;
			}
			st2:
			p+= 1;
			if ( p == pe )
			goto _test_eof2;
			st_case_2:
			if ( ( (*( p))) == 0 ) {
				goto ctr0;
			}
			{
				goto st0;
			}
			st3:
			p+= 1;
			if ( p == pe )
			goto _test_eof3;
			st_case_3:
			switch( ( (*( p))) ) {
				case 65: {
					goto st4;
				}
				case 97: {
					goto st4;
				}
			}
			{
				goto st0;
			}
			st4:
			p+= 1;
			if ( p == pe )
			goto _test_eof4;
			st_case_4:
			switch( ( (*( p))) ) {
				case 82: {
					goto st2;
				}
				case 114: {
					goto st2;
				}
			}
			{
				goto st0;
			}
			st5:
			p+= 1;
			if ( p == pe )
			goto _test_eof5;
			st_case_5:
			switch( ( (*( p))) ) {
				case 69: {
					goto st6;
				}
				case 101: {
					goto st6;
				}
			}
			{
				goto st0;
			}
			st6:
			p+= 1;
			if ( p == pe )
			goto _test_eof6;
			st_case_6:
			switch( ( (*( p))) ) {
				case 84: {
					goto st2;
				}
				case 116: {
					goto st2;
				}
			}
			{
				goto st0;
			}
			st7:
			p+= 1;
			if ( p == pe )
			goto _test_eof7;
			st_case_7:
			if ( ( (*( p))) == 111 ) {
				goto st8;
			}
			{
				goto st0;
			}
			st8:
			p+= 1;
			if ( p == pe )
			goto _test_eof8;
			st_case_8:
			if ( ( (*( p))) == 111 ) {
				goto st2;
			}
			{
				goto st0;
			}
			st9:
			p+= 1;
			if ( p == pe )
			goto _test_eof9;
			st_case_9:
			switch( ( (*( p))) ) {
				case 69: {
					goto st6;
				}
				case 101: {
					goto st10;
				}
			}
			{
				goto st0;
			}
			st10:
			p+= 1;
			if ( p == pe )
			goto _test_eof10;
			st_case_10:
			switch( ( (*( p))) ) {
				case 84: {
					goto st2;
				}
				case 101: {
					goto st2;
				}
				case 116: {
					goto st2;
				}
			}
			{
				goto st0;
			}
			st_out:
			_test_eof11: cs = 11; goto _test_eof; 
			_test_eof2: cs = 2; goto _test_eof; 
			_test_eof3: cs = 3; goto _test_eof; 
			_test_eof4: cs = 4; goto _test_eof; 
			_test_eof5: cs = 5; goto _test_eof; 
			_test_eof6: cs = 6; goto _test_eof; 
			_test_eof7: cs = 7; goto _test_eof; 
			_test_eof8: cs = 8; goto _test_eof; 
			_test_eof9: cs = 9; goto _test_eof; 
			_test_eof10: cs = 10; goto _test_eof; 
			
			_test_eof: {}
			_out: {}
		}
		
		#line 31 "ragel-guide-example-2.1.rl"
		
	}
	printf("result = %i\n", res2);
	return 0;
}

